<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>流浪书客 图书城</title>
		<link type="text/css" rel="stylesheet" href="css/second.css">
	</head>
	<body>
		<%@  include file="top.jsp"%>
		<div id="MIDDLE">
			<div class="position">
				<a href="index.jsp">首页</a>
				<c:if test="${not empty path}"> &nbsp; &gt;&nbsp; ${path} </c:if>
			</div>

			<!--左侧-->
			<div id="LEFT">
				<!-- 分类信息  -->
				<div id="category">

					<div id="categoryTitle">
						<!-- 标题  -->
						<div id="cateTitleName">
							<a href="${CONTEXT_ROOT}/SecondServlet?method=category&parentCategoryId=0">图书分类</a>
						</div>
					</div>
					<div id="cateContent">
						<!--一级分类 class= cateOne-->
						<div class="cateOne">
							<div id="cateOneContent">
								${bookCategory.categoryName}
							</div>
						</div>
						<!--二级分类-->
						<div id="pubContent">
							<ol>
								<c:forEach items="${categoryList}" var="category">
									<li>
										<a
											href="${CONTEXT_ROOT}/SecondServlet?method=list&parentCategoryId=${category.categoryId}">${category.categoryName}</a>

									</li>
								</c:forEach>
							</ol>
						</div>
					</div>
				</div>
				<!-- 浏览记录 -->
				<div id="category" style="margin-top:10px;">

					<div id="categoryTitle">
						<!-- 标题  -->
						<div id="cateTitleName">
							您的浏览记录
						</div>
					</div>
					<div id="cateContent">
						<!--一级分类 class= cateOne-->

						<!--二级分类-->
						<div id="pubContent">
							<ol>
								<c:forEach items="${categoryList}" var="category">
									<li>
										<a
											href="${CONTEXT_ROOT}/SecondServlet?method=list&parentCategoryId=${category.categoryId}">${category.categoryName}</a>

									</li>
								</c:forEach>
							</ol>
						</div>
						<div style="text-align: center;margin-top:10px;">

							<a href="#">清空浏览记录</a>

						</div>
					</div>
				</div>
			</div>

			<!-- 右侧 -->
			<div id="RIGHT">
				
				<c:forEach items="${bookPageList.objectList}" var="book">
					<div class="bookContent" onmousemove="this.className='on'"
						onmouseout="this.className='bookContent'">
						<!-- 书籍的信息 -->
						<table width="775px" border="0">
							<tr>
								<td rowspan="5" height="140px" align="center" valign="middle"
									width="21%">
									<a
										href="${CONTEXT_ROOT}/SysBookServlet?method=viewBook&bookId=${book.bookId}&parentCategoryId=${book.categoryId}"><img
											border="0" src="${CONTEXT_ROOT}/upload/${book.bookImg}"
											height="110px"> </a>
								</td>
								<td width="60%">
									<a
										href="${CONTEXT_ROOT}/SysBookServlet?method=viewBook&bookId=${book.bookId}&parentCategoryId=${book.categoryId}"><font
										face="微软雅黑" color="#2155AD"><strong>${book.bookName}</strong>
									</font> </a>
								</td>
								<td rowspan="2" valign="bottom" width="19%" align="center">
									<a href="${CONTEXT_ROOT}/ShoppingCartServlet?method=add&bookId=${book.bookId}">购买</a>
								</td>
							</tr>
							<tr>
								<td>
									作者：${book.bookAuthor}
								</td>
							</tr>
							<tr>
								<td>
									出版时间：${book.publishDate}
								</td>
								<td rowspan="2" valign="bottom" align="center">
									<a href="#">收藏</a>
								</td>
							</tr>
							<tr>
								<td>
									出版社：
									<c:forEach items="${publishList }" var="publish">
									${publish.publishId==book.publishId?publish.publishName:""}
					</c:forEach>
								</td>
							</tr>
							<tr>
								<td>
									市场价：￥
									<font color="#ff0000">${book.bookPrice}</font>元
								</td>
								<td>
								</td>
							</tr>
						</table>
					</div>
				</c:forEach>
				<div
					style="width: 782px; background-color: #E4F1DD; margin-top: 10px;">
					<div class="pageStr">
						${bookPageList.pageStr}
					</div>
				</div>
			</div>
		</div>
		<%@  include file="bottom.jsp"%>
	</body>
</html>